package com.leyou.user.service.impl;

import com.leyou.user.entity.User;
import com.leyou.user.entity.vo.userVo;
import com.leyou.user.mapper.UserMapper;
import com.leyou.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 车矣捕
 * @version 1.0
 * @description: 描述
 * @date 2022/7/7 19:27
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public List<User> userList(userVo user) {
        user.setPageNum((user.getPageNum()-1)*user.getPageSize());
        return userMapper.userList(user);
    }

    @Override
    public int updateUserStatus(userVo user) {
        return userMapper.updateUserStatus(user);
    }

    @Override
    public User userOneById(Integer userId) {
        return userMapper.userOneById(userId);
    }
}
